<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>

<head>

<title>Getting Started - phoneME Feature Software (MR4)</title>
<link rel="stylesheet" href="./style/document.css" type="text/css"> 

<!--
<style type="text/css"> /* <![CDATA[ */
@import "/branding/css/tigris.css";
@import "/branding/css/inst.css";
/* ]]> */</style>
<link rel="stylesheet" type="text/css" href="/branding/css/print.css" media="print" />
<script src="/branding/scripts/tigris.js" type="text/javascript"></script>

<script src="/branding/scripts/alm.js" type="text/javascript"></script>
<style type="text/css">
/* <![CDATA[ */
@import "/brinding/css/alm.css";
/* ]]> */
</style>
-->

<!--
<link rel="stylesheet" href="./style/tigris.css" type="text/css">
<link rel="stylesheet" href="./style/inst.css" type="text/css">
-->

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="version" content="4.5.2.148.4" />

<style type="text/css"></style>

</head>

<body  class="composite">
<div class="strut">&nbsp;</div>
</td>
<td id="midcol">
<div id="bodycol">

<!--  ================= BEGIN PAGE BODY (Ignore Everything Above)  ============ -->

<!-- Header -->
<table class="full-width">
  <tr>
    <td align="center" class=sun-darkblue>
      <h1>Getting Started</h1>
      <h2>phoneME&#153; Feature Software (MR4)</h2>
      <h4>April 2009</h4>
    </td>
  </tr>
  <tr>
    <td class=sun-lightblue>&nbsp;</td>
  </tr>
</table>
<p>
<!-- End Header -->

<!-- BEGIN PAGE TITLE -->
<div id="projecthome" class="app"> <h2><font color="#225577">Building the JavaCall
Porting Layer<span class="style1"></span></font></h2>
<!-- END PAGE TITLE -->

<p>
<a href="../index.html">home</a> | <a href="./index_feature.html">first</a> | 
<a href="./buildenv_feature.html">prev</a> | <a href="./pcsl_feature.html">next</a> | 
<a href="./client_feature.html">last</a> 
<p>

The JavaCall porting layer provides a uniform set of APIs that improve and simplify the 
phoneME Feature software porting process.   
<p>

To build a default implementation of the JavaCall porting layer, you take the following 
general steps:
<p>
<UL>
<LI>Set environment <a href="#javacall_var">variables</a> for your platform
<LI>Run <code>make</code> to <a href="#build_javacall">build</a> the JavaCall porting layer</LI>
</UL>
<P>

<!-- BEGIN SECTION HEAD -->
<hr noshade="noshade" size="1">
<a name="javacall_var"></a><h3>Setting JavaCall Porting Layer Environment Variables</h3>
<!-- END SECTION HEAD -->
<p>

The JavaCall has several environment variables that must be set, as shown in 
<a href="#table2-1">Table 2-1</a>. 
<P>
<b>Note:</b> Make note of the values you choose for these variables. When executing the
build procedures for PCSL, CLDC, and the phoneME Feature software client, you must set
corresponding values.
<P>

<A NAME="table2-1"></A>
<TABLE CLASS="Titled" BORDER=1 BORDERCOLORLIGHT="#FFFFFF" BORDERCOLORDARK="#000000"
CELLPADDING=5 CELLSPACING=0 >
<CAPTION><b>TABLE 2-1</b> Required JavaCall Porting Layer Build Variables</CAPTION>
<THEAD>
<TR>
<TH SCOPE="COL" ROWSPAN="1" COLSPAN="1" BGCOLOR="#CCCCCC">
<P CLASS="TableHead"><A NAME="pgfId-485154"></A>Name
</P>
</TH>
<TH SCOPE="COL" ROWSPAN="1" COLSPAN="1" BGCOLOR="#CCCCCC">
<P CLASS="TableHead"><A NAME="pgfId-485156"></A>Description
</P>
</TH>
</TR>
</THEAD>
<TBODY>
<TR>
<TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1">
<P>
<code>BuildDir</code>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P>
The location of your phoneME Feature build directory.
<p>
For example, 
<code>BuildDir=%COMPONENTS_DIR%/javacall-com/configuration/phoneMEFeature/win32_emul</code>.
<p>
</TD>
</TR>
<TR>
<TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1">
<P>
<code>JAVACALL_DIR</code>
<P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P>
Specifies the location of the base JavaCall API source code and makefiles, 
which contains MIDP and specific optional packages, including the following:
<p>
Java Wireless Messaging (JSR 120)
<br>
Mobile Media API (JSR 135)
<br>
Security and Trust Services (JSR 177)
<br>
Content Handler API (JSR 211)
<P>
For example, <code>JAVACALL_DIR=%COMPONENTS_DIR%/javacall</code>.
</TD>
</TR>
<TR>
<TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1">
<P>
<code>PROJECT_JAVACALL_DIR</code>
<P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P>
Specifies the location of additional JavaCall API source code and makefiles,
which includes additional optional packages, including the following:
<p>
Personal Information and File Management (JSR 75)
<br>
Bluetooth (JSR 82) 
<br>
Location API (JSR 179) 
<br>
Wireless Messaging (JSR 205)
<br>
Advanced Multimedia Supplements (JSR 234)
<br>
Mobile Sensor API (JSR 256)
<p>
For example, <code>PROJECT_JAVACALL_DIR=%COMPONENTS_DIR%/javacall-com</code>.   
</TD>
</TR>
<TR>
<TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1">
<P>
<code>JAVACALL_OUTPUT_DIR</code>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P>
Defines the directory where the build system places its output.  For example, 
<code>JAVACALL_OUTPUT_DIR=%BUILD_OUTPUT_DIR%/javacall</code>.
<p>	
</TD>
</TR>
<TR>
<TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1">
<P><code>USE_MULTIPLE_ISOLATES</code>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P>Required for phoneME Feature to support multitasking.  Must be set to
<code>true</code>. If not explicitly set to <code>true</code>, the build
defaults to <code>false</code> and phoneME Feature is built without multitasking
capability.
<p>
<b>Note:</b> If you set <code>USE_MULTIPLE_ISOLATES=true</code> to build the JavaCall
porting layer and phoneME Feature software client, you must also set 
<code>ENABLE_ISOLATES=true</code> to build CLDC, as described in 
<a href="./cldc_feature.html">Building a CLDC Reference Port</a>.
</P>
</TD>
</TR>
<TR>
<TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1">
<P>
<code>TOOLS_DIR</code>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P>
Defines the directory where needed build tools are located.  For example,
<code>TOOLS_DIR=%COMPONENTS_DIR%/tools</code>.
<p>
</TD>
</TR>
<TR>
<TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1">
<P>
<code>TOOLS_OUTPUT_DIR</code>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P>
Defines a directory location for tools-specific output.  For example,
<code>TOOLS_OUTPUT_DIR=%BUILD_OUTPUT_DIR%/tools</code>.
<p>
</TD>
</TR>
<TR>
<TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1">
<P>
<code>USE_VS2005</code>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P>
Tells the build system to use Microsoft Visual Studio 2005 as the default compiler
setting, as shown here: <code>USE_VS2005=true</code>.
<p>
<b>Note:</b> If Microsoft Visual Studio 2005 is your default compiler, you do not
need to set this variable. <code>USE_VS2005=true</code> is set for you in the MR4
build scripts. However, if you are using some other compiler (which is possible,
but not supported, in MR4), you <i>must</i> set this variable to
<code>USE_VS2005=false</code>.
<p>
</TD>
</TR>
<TR>
<TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1">
<P>
<code>USE_OUTPUT_REDIRECTION</code>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P>
Supports the use of the emulator binary plugin.  For example,
<code>USE_OUTPUT_REDIRECTION=true</code>.
<p>
</TD>
</TR>
</TBODY>
</TABLE>
<p>

<b>Note:</b> The phoneME Feature client software is complex and flexible, and many 
build options are available. For more information on build options, see
<a href="http://java.sun.com/javame/reference/docs/sjwc-2.2/pdf-html/html/build/index.html">
<i>Sun Java Wireless Client Software Build Guide</i></a>.
<P>


<!-- BEGIN SECTION HEAD -->
<hr noshade="noshade" size="1">
<a name="build_javacall"></a><h3>Building the JavaCall Porting Layer</h3>
<!-- END SECTION HEAD -->
<p>

To build an implementation of the JavaCall porting layer, take the following steps:
<p>
<ol>
<b><li>Set the</b> <code>BuildDir</code> <b>variable, as shown here:</b>
<p>
C:\> set <code>BuildDir=%COMPONENTS_DIR%/javacall-com/configuration/phoneMEFeature/win32_emul</code>
<!--
<p>
For more information on setting JavaCall build variables, see <a href="#table2-1">Table 2-1</a>.
-->
<P>
<b><li>Run the</b> <code>make</code> <b>command as a single command-line string, as 
shown here, using the <code>-C</code> option.</b>
<p>
<code>C:\> make -C %BuildDir% JAVACALL_DIR=%COMPONENTS_DIR%/javacall 
PROJECT_JAVACALL_DIR=%COMPONENTS_DIR%/javacall-com 
JAVACALL_OUTPUT_DIR=%BUILD_OUTPUT_DIR%/javacall USE_MULTIPLE_ISOLATES=true
TOOLS_DIR=%COMPONENTS_DIR%/tools TOOLS_OUTPUT_DIR=%BUILD_OUTPUT_DIR%/tools
USE_OUTPUT_REDIRECTION=true</code>
</ol>
<p>
<b>Note:</b> It is possible to include optional packages in your JavaCall porting layer 
build.  The makefiles for building these optional packages are picked up from the repository 
and zip archive with the JavaCall source, but no optional packages are built unless other 
variables are set.  For more information, see 
<a href="./begin_feature.html#op_pack">Including Optional Packages in Your Build</a>.
</OL>
<P>
When the <code>make</code> command has successfully completed, the JavaCall porting layer 
output is found  in <code>%JAVACALL_OUTPUT_DIR%</code>.
</UL>
<pre>


</pre>

<a href="../index.html">home</a> | <a href="./index_feature.html">first</a> | 
<a href="./buildenv_feature.html">prev</a> | <a href="./pcsl_feature.html">next</a> | 
<a href="./client_feature.html">last</a> 
<p>

<!-- =================================== END PAGE BODY ================== -->

<p>
<hr noshade="noshade" size="1">

<p class="copyright"><a href="./style/copyright.html">Copyright</a>
&#169; 2009 Sun Microsystems, Inc. All rights reserved. 
</p>

</div></td></tr></tbody></table></body></html>
